package cn.powerone.scm.service;

import java.util.Date;
import java.util.List;
import cn.powerone.scm.domain.ScmSupplier;
import org.springframework.transaction.annotation.Transactional;

/**
 * 供应商Service接口
 * 
 * @author PowerOne
 * @date 2025-06-23
 */
public interface IScmSupplierService 
{
    /**
     * 查询供应商
     * 
     * @param id 供应商主键
     * @return 供应商
     */
    public ScmSupplier selectScmSupplierById(Long id);

    /**
     * 查询供应商列表
     * 
     * @param scmSupplier 供应商
     * @return 供应商集合
     */
    public List<ScmSupplier> selectScmSupplierList(ScmSupplier scmSupplier);

    /**
     * 新增供应商
     * 
     * @param scmSupplier 供应商
     * @return 结果
     */
    public int insertScmSupplier(ScmSupplier scmSupplier);

    /**
     * 修改供应商
     * 
     * @param scmSupplier 供应商
     * @return 结果
     */
    public int updateScmSupplier(ScmSupplier scmSupplier);

    /**
     * 批量删除供应商
     * 
     * @param ids 需要删除的供应商主键集合
     * @return 结果
     */
    public int deleteScmSupplierByIds(Long[] ids);

    /**
     * 删除供应商信息
     * 
     * @param id 供应商主键
     * @return 结果
     */
    public int deleteScmSupplierById(Long id);

    @Transactional
    String importData(List<ScmSupplier> scmSupplier, boolean updateSupport, String operName);

    public int selectSupplierCountByMonth(Date yesterday);

    public int selectSupplierCountByYear(Date yesterday);

    public int selectSupplierCountAll();
}
